#ifndef XDEMUX_H
#define XDEMUX_H

#include "xformat.h"

class XDemux : public XFormat {
public:
  ////////////////////////////////////////
  /// \brief Open 打开文件或网络流
  /// \param url 文件或网络流
  /// \return 失败放回nullptr
  static AVFormatContext *Open(const char *url);
  /// 读取一帧数据
  /// \brief Read
  /// \param pkt
  /// \return
  bool Read(AVPacket *pkt);
  ///
  /// \brief Seek
  /// \param pts
  /// \param stream_index
  /// \return
  ///
  bool Seek(long long pts, int stream_index);
};

#endif // XDEMUX_H
